package com.travelparadise.service;

import java.util.Date;
import java.util.List;

import com.travelparadise.dao.VolDao;
import com.travelparadise.domain.Vol;

public class VolService {

	private VolDao volDao;

	public VolDao getVolDao() {
		return volDao;
	}
	
	public void setVolDao(VolDao volDao) {
		this.volDao = volDao;
	}
	
	public Vol getById(int id){
		return volDao.getById(id);
	}
	
	public List<Vol> getVols(String nomVilleDepart, String nomVilleArrivee, Date dateDepart){
		return (List<Vol>) volDao.searchByNameVilleDepartAndVilleArriveeAndDateDepart(nomVilleDepart, nomVilleArrivee, dateDepart);
	}
}
